package com.hundsun.cprs.yyt.service.trade.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.hundsun.cprs.yyt.common.base.DomainBase;

public class TradeMatch extends DomainBase{
    private Long id;

    private Date matchTime;

    private String goodsCode;

    private Long matchPrice;

    private Long matchAmount;

    private Long matchSeq;
    
    private List<TradeMatchDetail> details = new ArrayList<TradeMatchDetail>();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getMatchTime() {
        return matchTime;
    }

    public void setMatchTime(Date matchTime) {
        this.matchTime = matchTime;
    }

    public String getGoodsCode() {
        return goodsCode;
    }

    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode == null ? null : goodsCode.trim();
    }

    public Long getMatchPrice() {
        return matchPrice;
    }

    public void setMatchPrice(Long matchPrice) {
        this.matchPrice = matchPrice;
    }

    public Long getMatchAmount() {
        return matchAmount;
    }

    public void setMatchAmount(Long matchAmount) {
        this.matchAmount = matchAmount;
    }

    public Long getMatchSeq() {
        return matchSeq;
    }

    public void setMatchSeq(Long matchSeq) {
        this.matchSeq = matchSeq;
    }

    public List<TradeMatchDetail> getDetails() {
        return details;
    }

    public void setDetails(List<TradeMatchDetail> details) {
        this.details = details;
    }
    
    public void addTradeMatchDetail(TradeMatchDetail detail){
        getDetails().add(detail);
        detail.setMatch(this);
    }

}